package secondkill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import secondkill.pojo.TUser;
import secondkill.vo.LoginVo;
import secondkill.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 *  服务类
 * </p>
 * @author Dzy
 * @since 2022-01-13
 */
public interface ITUserService extends IService<TUser> {

    RespBean doLogin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);


    //每次在调用Controller之前就做好校验用户是否登录过
    TUser getUserByCookie(String userTicket, HttpServletRequest request, HttpServletResponse response);

    //用户对用户数据进行任何改变后, 用户存储在Redis中的数据也需要进行改变
    RespBean updatePassword(String tUserTicket, String password, HttpServletRequest request, HttpServletResponse response);
}
